home *** CD-ROM | disk | FTP | other *** search
- Path: news.ncl.ac.uk!usenet
- From: n387992 <Guanefu.Li@ncl.ac.uk>
- Newsgroups: comp.lang.c++
- Subject: ??? to disable Control-Break while containing I/O stream
- Date: 27 Mar 1996 00:30:59 GMT
- Organization: Newcastle University
- Message-ID: <4ja283$cdq@whitbeck.ncl.ac.uk>
- Reply-To: n4521661@mailserv.ncl.ac.uk
- NNTP-Posting-Host: tarn17.ncl.ac.uk
- X-Newsreader: WinVN 0.92.5
-
- I am writing a program using Borland C++. And I don't want the Control-C or Control-Break
- to terminate the program.
- So, I used "setcbrk(...)". It did not work.
- Control-C still could terminate the program.
-
- But some other my programs did not use "setcbrk(...)", but never
- got terminated by Control-C.
-
- Borland C++ on-line help said:
- Sets control-break setting.
- setcbrk uses the DOS system call 0x33 to turn control-break checking on or off.
-
- value = 0 Turns checking off (check only during I/O to console, printer,
- or communications devices).
- value = 1 Turns checking on (check at every system call).
- ==============================================
-
- I just noticed that in this program, there were some statements like
- "cout ...." or "cerr ....", those IO stream stuffs, though these
- statements were never to be called during the running.
-
- I just wonder whether IO stream enforce the effect of Control-C.
-
- Is there any way to disable Control-C absolutly?
-
- Thank you.
-
- Please also send you answer to:
-
- n4521661@mailserv.ncl.ac.uk
-